package com.chengyu.core.controller;

import com.chengyu.core.controller.UserBaseController;
import com.chengyu.core.entity.CommonResult;
import com.chengyu.core.model.CmsArticle;
import com.chengyu.core.model.CmsArticleCate;
import com.chengyu.core.service.config.ConfigSearchService;
import com.chengyu.core.service.content.*;
import com.chengyu.core.service.floor.FloorGlobalStyleService;
import com.chengyu.core.service.floor.FloorService;
import com.chengyu.core.service.system.BankConfigService;
import com.chengyu.core.service.system.ConfigService;
import com.chengyu.core.service.system.VerifyCodeService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.ResponseBody;

import java.util.List;

/**
 * @title  文章管理
 * @author wenlj
 * @date   2023/10/28
 */
@Api(tags = "文章管理")
@Controller
@RequestMapping("/common/article")
public class ArticleController extends UserBaseController {


	@Autowired
	private ArticleService articleService;
	@Autowired
	private ArticleCateService articleCateService;

//
//	@ApiOperation(value = "文章分类")
//	@ResponseBody
//	@RequestMapping(value="/cateList", method=RequestMethod.GET)
//	public CommonResult<List<CmsArticleCate>> getCateList() {
//		return CommonResult.success(articleCateService.getAllArticleCates());
//	}
//
//	@ApiOperation(value = "文章列表")
//	@ResponseBody
//	@RequestMapping(value="/list", method=RequestMethod.GET)
//	public CommonResult<List<CmsArticle>> getArticleList(Integer cateId, Integer type) throws Exception {
//		return CommonResult.success(articleService.getAllArticles(cateId, type));
//	}
//
//	@ApiOperation(value = "文章详情")
//	@ResponseBody
//	@RequestMapping(value="/detail", method=RequestMethod.GET)
//	public CommonResult<CmsArticle> detail(Integer articleId) throws Exception {
//		return CommonResult.success(articleService.getArticleById(articleId));
//	}
//
//
//
//	@ApiOperation(value = "文章分类")
//	@ResponseBody
//	@RequestMapping(value="/articleCate/getCateList", method=RequestMethod.GET)
//	public CommonResult<List<CmsArticleCate>> getCateList() {
//		return CommonResult.success(articleCateService.getAllArticleCates());
//	}
//
//	@ApiOperation(value = "文章列表")
//	@ResponseBody
//	@RequestMapping(value="/article/getList", method=RequestMethod.GET)
//	public CommonResult<List<CmsArticle>> getArticleList(Integer cateId, Integer type) throws Exception {
//		return CommonResult.success(articleService.getAllArticles(cateId, type));
//	}
//
//	@ApiOperation(value = "文章详情")
//	@ResponseBody
//	@RequestMapping(value="/article/get", method=RequestMethod.GET)
//	public CommonResult<CmsArticle> get(Integer articleId) throws Exception {
//		return CommonResult.success(articleService.getArticleById(articleId));
//	}



}
